package com.t.bricks.bussiness.db.entity.ordersdetail.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;

import com.t.bricks.annotation.DataInfo;

/**
 * 订单详情'OrdersDetail'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("订单详情OrdersDetail")
@DataInfo(sDbName="BricksMall", sTableName="OrdersDetail")
public class OrdersDetailBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 记录编号(订单编号+序号)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="sId", sComment="记录编号(订单编号+序号)", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=true, isNull=false,
		iMaxLength=12, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="记录编号(订单编号+序号)", example="", position=0)
	//[end]
	protected String sId;

	/**
	 * 订单编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="sOrderId", sComment="订单编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="订单编号", example="", position=1)
	//[end]
	protected String sOrderId;

	/**
	 * 购物车编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="sCartId", sComment="购物车编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="购物车编号", example="", position=2)
	//[end]
	protected String sCartId;

	/**
	 * 商品编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="sWaresId", sComment="商品编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="商品编号", example="", position=3)
	//[end]
	protected String sWaresId;

	/**
	 * 商品名称(冗余)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="sWaresName", sComment="商品名称(冗余)", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=64, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=4 )
	@ApiModelProperty(value="商品名称(冗余)", example="", position=4)
	//[end]
	protected String sWaresName;

	/**
	 * 数量
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="iNumber", sComment="数量", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=5 )
	@ApiModelProperty(value="数量", example="1", position=5)
	//[end]
	protected Integer iNumber;
	
	/**
	 * 单价(元)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="mPrice", sComment="单价(元)", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=6, iDecimalLength=2, iIndex=6 )
	@ApiModelProperty(value="单价(元)", example="0.00", position=6)
	//[end]
	protected BigDecimal mPrice;
	
	/**
	 * 支付优惠卷
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="mCouponPay", sComment="支付优惠卷", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=6, iDecimalLength=2, iIndex=7 )
	@ApiModelProperty(value="支付优惠卷", example="0.00", position=7)
	//[end]
	protected BigDecimal mCouponPay;

	/**
	 * 赠送积分
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersDetail",
		sName="iTallyLargess", sComment="赠送积分", isDbField=true, sDbFileType="int",
		sDefaultData="0", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=8 )
	@ApiModelProperty(value="赠送积分", example="0", position=8)
	//[end]
	protected Integer iTallyLargess;

	/**
	 * 取 记录编号(订单编号+序号)
	 * @return String
	 */
	public String getsId() {
		return sId;
	}

	/**
	 * 设置记录编号(订单编号+序号)
	 * @param sId
	 */
	public void setsId(String sId) {
		this.sId = sId;
	}

	/**
	 * 取 订单编号
	 * @return String
	 */
	public String getsOrderId() {
		return sOrderId;
	}

	/**
	 * 设置订单编号
	 * @param sOrderId
	 */
	public void setsOrderId(String sOrderId) {
		this.sOrderId = sOrderId;
	}

	/**
	 * 取 购物车编号
	 * @return String
	 */
	public String getsCartId() {
		return sCartId;
	}

	/**
	 * 设置购物车编号
	 * @param sCartId
	 */
	public void setsCartId(String sCartId) {
		this.sCartId = sCartId;
	}

	/**
	 * 取 商品编号
	 * @return String
	 */
	public String getsWaresId() {
		return sWaresId;
	}

	/**
	 * 设置商品编号
	 * @param sWaresId
	 */
	public void setsWaresId(String sWaresId) {
		this.sWaresId = sWaresId;
	}

	/**
	 * 取 商品名称(冗余)
	 * @return String
	 */
	public String getsWaresName() {
		return sWaresName;
	}

	/**
	 * 设置商品名称(冗余)
	 * @param sWaresName
	 */
	public void setsWaresName(String sWaresName) {
		this.sWaresName = sWaresName;
	}

	/**
	 * 取 数量
	 * @return Integer
	 */
	public Integer getiNumber() {
		return iNumber;
	}

	/**
	 * 设置数量
	 * @param iNumber
	 */
	public void setiNumber(Integer iNumber) {
		this.iNumber = iNumber;
	}

	/**
	 * 取 单价(元)
	 * @return Long
	 */
	public BigDecimal getmPrice() {
		return mPrice;
	}

	/**
	 * 设置 单价(元)
	 * @param mPrice
	 */
	public void setmPrice(BigDecimal mPrice) {
		this.mPrice = mPrice;
	}

	/**
	 * 取 支付优惠卷
	 * @return Long
	 */
	public BigDecimal getmCouponPay() {
		return mCouponPay;
	}

	/**
	 * 设置 支付优惠卷
	 * @param mCouponPay
	 */
	public void setmCouponPay(BigDecimal mCouponPay) {
		this.mCouponPay = mCouponPay;
	}

	/**
	 * 取 赠送积分
	 * @return Integer
	 */
	public Integer getiTallyLargess() {
		return iTallyLargess;
	}

	/**
	 * 设置赠送积分
	 * @param iTallyLargess
	 */
	public void setiTallyLargess(Integer iTallyLargess) {
		this.iTallyLargess = iTallyLargess;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return OrdersDetailBase
	 */
	public static OrdersDetailBase copy(OrdersDetailBase source) {
		if (null == source) {
			return null;
		}
		
		OrdersDetailBase target = new OrdersDetailBase();
		target.setsId(source.getsId());
		target.setsOrderId(source.getsOrderId());
		target.setsCartId(source.getsCartId());
		target.setsWaresId(source.getsWaresId());
		target.setsWaresName(source.getsWaresName());
		target.setiNumber(source.getiNumber());
		target.setmPrice(source.getmPrice());
		target.setmCouponPay(source.getmCouponPay());
		target.setiTallyLargess(source.getiTallyLargess());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return OrdersDetailBase
	 */
	public OrdersDetailBase clone() {
		return copy(this);
	}
	
}
